<?php
class mustacheController extends \Hyang\Controller
{
   public function indexAction()
   {
       //echo $this->view->render('Hi {{brximl}}',['brximl'=>'My Girl']);
       //$md = $this->view->loadTemplate(APP_ROOT.'/APP/View/Index/index.html');
       $md = $this->view->loadTemplate('Mustache/index.html');
       echo $md->render([
           'brximl'=>'My Girl',
             'jahn'=>'Conero pop evil',
             'name' => "Chris",
             'company' => '<b>GitHub</b>',
             'arr'     =>[
                 'version'=> Version,
                 'author'=> 'Joshua Conero',
             ],
             'jude' => true,
             'music'=> [
                 ['name' => 'Just A Felling'],
                 ['name' => 'Make Me Wonder'],
                 ['name' => 'I an\'t go home without you!']
             ]
        ]);
   }
   public function all21Action()
   {
       $this->setVar('brximl','whate brx said before');
       $this->setVars([
           'jahn'=> rand(10000000,999999).'<br>版本信息：'.$this->getVEVersion()
           ,'company' => date('Y-m-d H:i:s')
       ]);
       $this->render('Mustache/index.html');
   }
   public function _init()
   {
       $this->selfViewParam = array(
           'name' => 'Mustache',
           'option' => 'config_mustache'
       );
   }
}